//
//  XMCheckGroupInfo.m
//  XMWeibo
//
//  Created by chi on 14-9-2.
//  Copyright (c) 2014年 xiaoming. All rights reserved.
//

#import "XMCheckGroupInfo.h"

#import "XMCheckSettingItem.h"
#import "XMLabelSettingItem.h"

@implementation XMCheckGroupInfo


- (void)setCheckItem:(XMCheckSettingItem *)checkItem
{
    _checkItem = checkItem;
    _source.labelText = checkItem.title;
    for (XMCheckSettingItem *item in self.cellItems) {
        item.isChecked = _checkItem == item;
    }
}

- (void)setSource:(XMLabelSettingItem *)source
{
    _source = source;
    
    for (XMCheckSettingItem *item in self.cellItems) {
        item.isChecked = [source.labelText isEqualToString:item.title];
    }

    
}

@end
